package com.dyz.swordFingerOffer;

/**
 * @author: daiyizheng
 * @date: 2021/5/28 21:28
 * @description:
 */
public class JumpFloor10x2 {
    public int jumpFloor(int target) {
        //write code here
        if (0<target && target<3){
            return target;
        }
        int a = 2;
        int b = 1;
        int res = 0;
        for (int i=0; i<target-2;i++){
            res = a +b;
            b = a;
            a=res;
        }
        return res;
    }

}
